import Vue from 'vue'
import Router from 'vue-router'
import login from 'views/login.vue'
import layout from 'views/layout.vue'
import user from 'views/user.vue'
import management from 'views/management.vue'
import shop from 'views/shop.vue'



Vue.use(Router)

export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/user',
      component: layout,
      children:[{
        path: '',
        name: 'user',
        component: user,
      }]
    },
    {
      path: '/management',
      component: layout,
      children:[{
        path: '',
        name: 'management',
        component: management,
      }]
    },
    {
      path: '/shop',
      component: layout,
      children:[{
        path: '',
        name: 'shop',
        component: shop,
      }]
    }
  ]
})
